package com.itljm.cxrMarket.mapper;

import com.itljm.cxrMarket.entity.SysRolePermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itljm.cxrMarket.entity.dto.RolePermissionDTO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Collection;
import java.util.List;

public interface SysRolePermissionMapper extends BaseMapper<SysRolePermission> {
    List<String> selectPermissionsByRoleIds(@Param("roleIds") Collection<Long> roleIds);

    void deleteByRoleId(@Param("roleId") Long roleId);

    void insertRolePermission(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);

    List<String> selectPermissionNamesByRoleId(@Param("roleId") Long roleId);

    List<Long> selectPermissionIdsByRoleIds(List<Long> roleIds);

    List<RolePermissionDTO> selectPermissionByRoleId(Long roleId);
}




